﻿var LODOP; //声明为全局变量   
function Preview1() {
    CreateFullBill();
    LODOP.PREVIEW();
};
function Design1() {
    CreateFullBill();
    LODOP.PRINT_DESIGN();
};
function Preview2() {
    CreateDataBill();
    LODOP.PREVIEW();
};
function Setup2() {
    CreateDataBill();
    LODOP.PRINT_SETUP();
};
function Design2() {
    LODOP.PRINT_DESIGN();

};
function RealPrint() {
    CreateDataBill();
    if (LODOP.PRINTA())
        alert("已发出实际打印命令！");
    else
        alert("放弃打印！");
};

function CreateFullBill() {
    LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
    LODOP.PRINT_INITA(-2, -1, 800, 600, "打印控件功能演示_Lodop功能_名片");
    LODOP.SET_PRINT_STYLE("FontSize", 11);
    LODOP.ADD_PRINT_RECT(142, 71, 655, 422, 0, 1);
    LODOP.ADD_PRINT_TEXT(27, 311, 200, 80, "送单货");
    LODOP.SET_PRINT_STYLEA(0, "FontSize", 36);
    LODOP.SET_PRINT_STYLEA(0, "Horient", 2);
    LODOP.ADD_PRINT_LINE(270, 77, 270, 722, 0, 1);
};
function CreateDataBill() {
    LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
    LODOP.PRINT_INITA(-2, -1, 800, 600, "打印控件功能演示_Lodop功能_名片");
    LODOP.SET_PRINT_STYLE("FontSize", 11);
    LODOP.ADD_PRINT_RECT(142, 71, 655, 422, 0, 1);
    LODOP.ADD_PRINT_TEXT(27, 311, 200, 80, "送单货");
    LODOP.SET_PRINT_STYLEA(0, "FontSize", 36);
    LODOP.SET_PRINT_STYLEA(0, "Horient", 2);
    LODOP.ADD_PRINT_LINE(270, 77, 270, 722, 0, 1);
}